package com.dragon.modules.yuegou.entity.system;

import com.baomidou.mybatisplus.annotation.TableName;
import com.dragon.modules.yuegou.enums.system.DataAccessOwnerType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * 数据权限实体类<br>
 * 对应的表为：sys_data_access<br>
 * 
 * @author pbuilder generated
 * @date 2019-03-15 15:37:59
 * @company sgy
 * @version 2.0
 */
@TableName("sys_data_access")
@ApiModel(description = "数据权限")
public class DataAccessEntity {
	protected String id;

    /**  */
	protected String userId;

    /** [枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT */
	@ApiModelProperty("[枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT")
	protected DataAccessOwnerType ownerType;

    /** 商圈id */
	@ApiModelProperty("商圈id")
	protected String busdId;

    /** 集团id */
	@ApiModelProperty("集团id")
	protected String groupId;

    /**  */
	protected LocalDateTime createdTime;

    /**  */
	protected String createdBy;

	/**
	 * 构造一个空数据权限实体对象
	 */
	public DataAccessEntity(){
		super();
	}

	/**
	 * 依据其它对象的信息构造一个数据权限实体对象
	 * 
	 * @param other 其它对象
	 */
	public DataAccessEntity(DataAccessEntity other){
		super();
     	this.id = other.id;
     	this.userId = other.userId;
     	this.ownerType = other.ownerType;
     	this.busdId = other.busdId;
     	this.groupId = other.groupId;
     	this.createdTime = other.createdTime;
     	this.createdBy = other.createdBy;
	}


	/**
	 * 获取
	 * 
	 * @return id 
	 */
	public String getId() {
		return id;
	}
  	
	/**
	 * 设置
	 * 
	 * @param id 
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * 获取
	 * 
	 * @return userId 
	 */
	public String getUserId() {
		return userId;
	}
  	
	/**
	 * 设置
	 * 
	 * @param userId 
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * 获取[枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 * 
	 * @return ownerType [枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 */
	public DataAccessOwnerType getOwnerType() {
		return ownerType;
	}
  	
	/**
	 * 设置[枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 * 
	 * @param ownerType [枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 */
	public void setOwnerType(DataAccessOwnerType ownerType) {
		this.ownerType = ownerType;
	}

	/**
	 * 获取商圈id
	 * 
	 * @return busdId 商圈id
	 */
	public String getBusdId() {
		return busdId;
	}
  	
	/**
	 * 设置商圈id
	 * 
	 * @param busdId 商圈id
	 */
	public void setBusdId(String busdId) {
		this.busdId = busdId;
	}

	/**
	 * 获取集团id
	 * 
	 * @return groupId 集团id
	 */
	public String getGroupId() {
		return groupId;
	}
  	
	/**
	 * 设置集团id
	 * 
	 * @param groupId 集团id
	 */
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	/**
	 * 获取
	 * 
	 * @return createdTime 
	 */
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}
  	
	/**
	 * 设置
	 * 
	 * @param createdTime 
	 */
	public void setCreatedTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
	}

	/**
	 * 获取
	 * 
	 * @return createdBy 
	 */
	public String getCreatedBy() {
		return createdBy;
	}
  	
	/**
	 * 设置
	 * 
	 * @param createdBy 
	 */
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

    public String toString() {
		return new StringBuilder().append("DataAccessEntity{").
			append("id=").append(id).
			append(",userId=").append(userId).
			append(",ownerType=").append(ownerType).
			append(",busdId=").append(busdId).
			append(",groupId=").append(groupId).
			append(",createdTime=").append(createdTime).
			append(",createdBy=").append(createdBy).
			append('}').toString();
    }

	/**
	 * 复制对象
	 * 
	 * @return 复制后的新实体对象
	 */
	public DataAccessEntity copy() {
		return new DataAccessEntity(this);
	}

    /**  */
	public static final String COL_ID = "id";

    /**  */
	public static final String COL_USER_ID = "user_id";

    /** [枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT */
	public static final String COL_OWNER_TYPE = "owner_type";

    /** 商圈id */
	public static final String COL_BUSD_ID = "busd_id";

    /** 集团id */
	public static final String COL_GROUP_ID = "group_id";

    /**  */
	public static final String COL_CREATED_TIME = "created_time";

    /**  */
	public static final String COL_CREATED_BY = "created_by";
}
